package com.zhouqinuan.spring.cloud.develop.framework.rabbitmq.callback;

import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate.ConfirmCallback;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class DefaultConfirmCallback implements ConfirmCallback {

    @Override
    public void confirm(CorrelationData correlationData, boolean ack, String cause) {

        if (log.isDebugEnabled()) {
            log.debug("confirm callback id:{}, ack:{}, cause:{}", correlationData != null ? correlationData.getId() : "", ack, cause);
        }
    }

}
